package juc.singleton;

/**
 * 饿汉式,静态代码块
 */
public class Singleton2 {
    private final static Singleton2 SINGLETON_2;

    static {
        SINGLETON_2 = new Singleton2();
    }

    private Singleton2() {
    }

    public static Singleton2 getInstance() {
        return SINGLETON_2;
    }
}
